Method for optical recognition of markers

ABSTRACT

The present invention relates to a robust method for optical recognition of markers in an outdoor environment. In this context, the present invention provides a method for optical recognition of optical markers comprising the steps of: acquiring an image; identifying regions of contiguous colours in the image by flood filling; extracting data and parameters of the contiguous regions; and detecting an optical marker by means of a convex hull algorithm and prediction of position of squares based on the data and parameters extracted from the contiguous Thus, the method of the present invention allows identification of markers, such as chequerboards and targets, unequivocally and with enough robustness as regards partial occlusions and variations of illumination.

FIELD OF THE INVENTION

This application claims the benefit of priority to BR 10 2018 003125-2,filed 19 Feb. 2018, which is incorporated herein by reference in itsentirety.

The present disclosure relates to a method for optical recognition ofmarkers. More particularly, the present disclosure relates to a robustmethod for optical recognition of markers in an outdoor environment.

BACKGROUND OF THE INVENTION

Detection of patterns in an outdoor environment is a challenging taskthat has been the object of research in many fields, from facerecognition to recognition of patterns inserted in environments withvarying illumination. However, little attention has been paid to theproblem of locating optical markers in external situations, where theillumination and the overall histogram may vary considerably.

Among the possible applications of a robust method for opticalrecognition of markers in an outdoor environment, we may mention:

(i) identification and localization of components, equipment or otherobjects in construction sites, shipyards, ships and platforms;

(ii) systems for dynamic positioning of equipment for assembly ofmodules and platforms;

(iii) applications of virtual reality with immersion in an outdoorenvironment;

(iv) geolocation and optical reference systems for aircraft, manned orunmanned;

(v) locating, monitoring the movement of and tracking components andequipment in an outdoor environment;

(vi) feedback system for robotized positioning of components.

At present, optical recognition of markers is restricted to indoorenvironments with controlled illumination, and there are no requirementsfor robustness in an outdoor environment. These methods are generallyassociated with the creation of augmented reality, which is very commonnowadays.

Document WO2015176163A1, for example, discloses a method for detecting amarker in an image including the steps of: (i) detecting a marker in oneor more previous frames of the image; (ii) using an edge detector fordetecting an edge in a current frame of said image; (iii) tracking linesegment edges of the marker detected in the previous frame to find a newset of line segments; (iv) grouping the new set of line segments tosupply a new set of polygons having salient points; (v) calculatinghomography from polygon salient points; (vi) generating a list ofhomographies; (vii) extracting binary data from the input image havinghomographies; (viii) verifying if the image is a marker by performingcheck sum and error correction functions; and (ix) if the image is amarker, identify as a marker and verify binary data, wherein the imageis a consecutive image sequence.

Document U.S. Pat. No. 8,963,957B2 discloses a system and method foraugmenting the view of reality. In one embodiment, a first medium issuperimposed over a first view of reality. One or more changes to thesuperimposed medium are received, such as a change in transparency,change in size and change in position. A first marker, comprising atleast a portion of the first view of reality, is generated. Firstmetadata relating to the first medium and/or the first marker are alsogenerated. The first medium, the first marker, and the first metadataare sent to a depository. In another embodiment, a second medium, secondmarker, and second metadata are received from the depository. The secondmarker is matched to at least a portion of a second view of reality, andthe second medium is superimposed over the at least one portion of thesecond view of reality to generate an augmented view of reality.

Document EP1720131B1 describes an augmented reality method and systemcomprising: (i) means for gathering image data of a real environment,(ii) means for generating virtual image data from said image data, (iii)means for identifying a predefined marker object of the real environmentbased on the image data, and (iv) means for superimposing a set ofobject image data with the virtual image data at a virtual imageposition corresponding to the predefined marker object.

However, none of the methods described in the aforementioned documentsdiscloses steps that would provide robustness in the identification ofmarkers in an outdoor environment.

In addition, as is known, the technology most used for opticalrecognition is ARToolKit, which is widely used in the creation ofaugmented reality. The ARToolKit algorithm comprises the followingsteps:

1. Image acquisition;

2. Digitization;

3. Identification of connected components;

4. Identification of fine edges;

5. Extraction of vertices and sides;

6. Normalization of the pattern;

7. Comparison with templates;

8. Homography and camera transformation;

9. Inclusion of the virtual object.

However, this technology has serious limitations that mean that it isnot very robust for use in an industrial and construction siteenvironment—recognition of the markers fails in situations withuncontrolled illumination or partial occlusion. In particular, steps 3,4, 5 and 7 listed above are quite sensitive to variations inillumination and partial occlusion, so that this technology is notrobust enough for application in outdoor environments.

Other tracking technologies exist, such as radio frequencyidentification (RFID) and VICON systems that require fixing uniquemarkers on the components, but they require databases and complex dataacquisition equipment.

Thus, in the prior art there is a need for a technique for opticalrecognition of markers in common use that is robust even in situationsof uncontrolled illumination or partial occlusion, as normallyencountered in outdoor environments.

As will be described in more detail hereunder, the present disclosureaims to solve the problem of the prior art described above in apractical and efficient manner.

SUMMARY OF THE INVENTION

The present disclosure aims to provide a method for optical recognitionof markers in an outdoor environment that is robust even in situationsof uncontrolled illumination or partial occlusion.

According to the present disclosure, there is provided a method foroptical recognition of optical markers comprising one or more of thesteps of: acquiring an image; identifying regions of contiguous coloursin the image by flood filling; extracting data and parameters of thecontiguous regions; and detecting an optical marker by means of a convexhull algorithm and prediction of position of squares based on the dataand parameters extracted from the contiguous regions. The method may beparticularly suitable for use in an outdoor environment.

Optionally, the optical marker is a target comprising concentric circlesor a checkerboard.

Optionally, the step of identifying regions of contiguous colours in theimage comprises the following substeps: applying at least one filter tothe image; detecting edges in the image so as to separate the differentregions of contiguous colours; carrying out the filling of the separatedregions using flood filling; and identifying each of the differentregions of contiguous colours by their properties.

Optionally, the substep of carrying out filling of the separated regionscomprises at least one of the following substeps: receiving an edge map;creating a map of colour regions; initializing the map of colour regionsby assigning an index to each pixel, the index being a unique colournumber; and performing the following steps, until the map of colourregions remains unchanged: (i) scanning the map of colour regions fromleft to right, from right to left, from top to bottom and from bottom totop in parallel, in any order; (ii) if the pixel is not located withinany edge and its index is greater than that of the preceding pixel, givethe present pixel the same index as the preceding pixel.

Optionally, the step of detecting the optical marker comprises at leastone of the following substeps: (i) calculating the convex hull of thecentres of regions of contiguous colours grouped in the same region;(ii) for each vertex v_(n) in the convex hull, calculating the anglebetween the lines formed by v_(n)→v_(n-1) and v_(n)→v_(n-1); (iii)ordering the vertices by the calculated angles; and (iv) keeping thefour vertices with the largest angles therebetween and discardingregions whose opposite angles are higher than a threshold.

Optionally, the step of detecting the optical marker further comprisesan analysis of regularity of chequerboards, comprising at least one ofthe following substeps: (i) applying a convex hull algorithm using the2D centres of the contiguous regions to find four outer squares at theedges of a chequerboard; (ii) calculating and storing the location offixed squares using the four outer squares as reference; (iii) if thegroup of regions being analysed possesses sufficient regions, assigningregions to positions on the closest chequerboard having four outersquares; (iv) rejecting the chequerboard if more than one region isassigned to the same position.

Optionally, the four outer squares are of the same colour. Optionally,the four outer squares are black.

According to the present disclosure, there is also provided a method foroptical recognition of optical markers comprising the steps of:acquiring an image; identifying regions of contiguous colours in theimage by flood filling; extracting data and parameters of the contiguousregions; and detecting an optical marker based on the data andparameters extracted from the contiguous regions by combining theparameters in order to identify an optical marker, the optical markerbeing a target comprising a plurality of concentric circles.

Optionally, the method further comprises an assigning a letter to eachof the contiguous regions to identify the sequence of colours of theplurality of concentric circles.

According to the present disclosure, there is also provided a method foroptical recognition of markers in an outdoor environment, characterizedin that it comprises at least one of the steps of: a) acquiring animage; b) identifying regions of contiguous colours in the image byparallel filling; c) extracting data and parameters of the contiguousregions; and d) detecting targets and chequerboards by means of a convexwrapping algorithm and prediction of position of squares.

Optionally, step (b) of identifying regions of contiguous colours in theimage comprises the following substeps: applying at least one filter tothe image; detecting edges so as to separate the different regions ofcontiguous colours; carrying out the filling of the separated regionsusing parallel filling; and identifying each of the different regionsaccording to their properties.

Optionally, the substep of carrying out filling of the regions comprisesat least one of the following substeps: receiving an edge map; creatinga map of colour regions; initializing the map of colour regions byassigning each pixel to a unique colour number, called index; andperforming the following steps, until the map of colour regions remainsunchanged: (i) scanning the map of regions from left to right, fromright to left, from top to bottom and from bottom to top in parallel, inany order; (ii) if the pixel is not located within any edge and itsindex is greater than that of the preceding pixel, give the presentpixel the same index as the preceding pixel.

Optionally, step (d) of detecting targets and chequerboards by means ofa convex wrapping algorithm and prediction of position of squarescomprises at least one of the following substeps: (i) calculating theconvex wrapping of the centres of regions of contiguous colours groupedin the same region; (ii) for each vertex v_(n) in the convex wrapping,calculating the angle between the lines formed by v_(n)→v_(n-1) andv_(n)→v_(n-1); (iii) ordering the vertex by its angles; and (iv) keepingthe first four vertices and discarding regions whose opposite angles arevery different from one another.

Optionally, step (d) of detecting targets and chequerboards by means ofa convex wrapping algorithm and prediction of position of squaresadditionally comprises an analysis of regularity of chequerboards,comprising at least one of the following substeps: (i) applying a convexwrapping algorithm using the centre 2D of the contiguous region to findsquares at the edges; (ii) calculating and storing the location of fixedsquares using the four black outer squares as reference; (iii) if thegroup of the region being analysed possesses sufficient regions,assigning regions to its position on the closest board; (iv) rejectingthe chequerboard if more than one region is assigned to the sameposition.

In order to achieve the aforestated aim, the present disclosure providesa method for optical recognition of markers in an outdoor environment,comprising the steps of (a) acquiring an image, (b) identifying regionsof contiguous colours in the image by flood filling, (c) extracting dataand parameters of the contiguous regions and (d) detecting targets andchequerboards by means of a convex hull algorithm and prediction ofposition of squares.

BRIEF DESCRIPTION OF THE FIGURES

The detailed description presented hereunder refers to the appendedfigures and their respective reference numbers.

FIG. 1a shows an example image in grey where the method of the presentdisclosure is applied.

FIG. 1b shows initialization of the colour map with the respectiveindices with reference to FIG. 1 a.

FIG. 2a shows a typical edge map of the Sobel method applied to thepresent example.

FIG. 2b shows a first scan from left to right applied to the presentexample.

FIG. 3a shows a first scan from right to left applied to the presentexample.

FIG. 3b shows a first scan from top to bottom applied to the presentexample.

FIG. 4a shows a first scan from bottom to top applied to the presentexample.

FIG. 4b shows a second scan from left to right applied to the presentexample.

FIG. 5a shows a second scan from right to left applied to the presentexample.

FIG. 5b shows a second scan from top to bottom applied to the presentexample.

FIG. 6a shows the final configuration of the map after the second scanfrom bottom to top, the third scan from left to right and the third scanfrom right to left in the present example.

FIG. 6b shows the final configuration of the map in the present examplewith the regions identified with unique colours.

FIG. 7 shows a region of contiguous colours in a ring format.

FIG. 8 shows chequerboards compared with irregular patterns.

FIGS. 9 and 10 show chequerboards of different sizes that are identifiedin different positions and inclinations.

FIG. 11 shows examples of occlusion patterns in which identification ofthe chequerboard will still take place successfully by the method of thepresent disclosure.

FIGS. 12 and 13 shows examples of patterns of targets (markers)identifiable by the method of the present disclosure.

DETAILED DESCRIPTION OF THE INVENTION

Firstly, it is emphasized that the description given hereunder will bebased on a preferred embodiment. As will be obvious to a person skilledin the art, however, the invention is not limited to this particularembodiment.

The present disclosure provides a method for optical recognition ofmarkers. The method may be particularly suitable for recognising markersin an outdoor environment. The first step (a) of the method may beacquiring an image. Preferably, the image comprises optical markerslocated in the environment where it is desired to perform therecognition. The optical marker may be a target comprising concentriccircles, or a checkerboard (i.e. an area made up of alternating colouredsquares, such as black and white squares). The image may be acquired byany suitable method, for example by using a camera.

The second part of the method is step (b) of identifying regions ofcontiguous colours in the image by flood filling (also known as parallelfilling). This part of the method is preferably divided into thefollowing steps:

(i) optionally, applying at least one filter to the image;

(ii) detecting edges so as to separate the different regions ofcontiguous colours;

(iii) carrying out filling of the separated regions using flood filling;and

(iv) identifying each of the different regions of contiguous colours bytheir properties.

Preferably, step (ii) may be carried out using multiple edge algorithms,such as the Sobel method, widely known in the prior art. The document“BAGLODI, V. Edge detection comparison study and discussion of newmethodology. In: IEEE Southeastcon 2009. [S.I.: s.n.], 2009. P. 446-446.ISSN 1091-0050.” describes in detail the use of the Sobel method, andits contents are incorporated here by reference.

Preferably, step (iii) of performing filling of the separated regionsusing flood filling comprises the following substeps:

(iii-a) receiving an edge map;

(iii-b) creating a map of colour regions;

(iii-c) initializing the map of colour regions by assigning each pixelto a unique index number, the index representing a colour; and

(iii-d) performing the following steps until the map of colour regionsremains unchanged:

(iii-d-1) scanning the map of regions from left to right, from right toleft, from top to bottom and from bottom to top, in parallel and in anyorder;

(iii-d-1) if the pixel is not located within any edge and its index isgreater than that of the preceding pixel, giving the present pixel thesame index as the preceding pixel.

FIGS. 1 to 6 illustrate the proposed algorithm for identifying regionsof contiguous colours using an image created for this purpose. Inparticular, FIGS. 1a and 1b show, respectively, the example image ingrey and initialization of the colour map with the respective indices.FIGS. 2a and 2b show, respectively, a typical edge map of the Sobelmethod and a first scan from left to right. In each row, when scanningfrom left to right, pixels which are not located within the edge andhave a number greater than the previous pixel are given the same numberas the previous pixel. For example, pixels 1-14 from FIG. 2a are giventhe number “O” in FIG. 2b . On the other hand, pixels 31-49 are notrenumbered because they are part of the edge region. FIGS. 3a and 3bshow, respectively, a first scan from right to left (in which there areno changes from FIG. 2b ) and a first scan from top to bottom. FIGS. 4aand 4b show, respectively, a first scan from bottom to top (in whichthere are no changes from FIG. 3b ) and a second scan from left toright. FIGS. 5a and 5b show, respectively, a second scan from right toleft and a second scan from top to bottom. FIG. 6a shows the finalconfiguration of the map afterthe second scan from bottom to top (nochanges), the third scan from left to right (no changes) and the thirdscan from right to left.

The two regions of the image are identified when the algorithmterminates, as illustrated in FIG. 6b . The number of parallel items ofwork is equal to the height of the image when scanning the lines and tothe width of the image when scanning the lines. This may produce morethan 1000 items of work in each case when processing a Full HD image(1920×1080 pixels). Scanning in all directions (left to right, right toleft, from top to bottom and from bottom to top) is necessary because achange of edge index only occurs when the current pixel index is greaterthan the index of the preceding pixel.

When the algorithm of step (iii) explained above is complete, the nextstep of identifying the different regions by their properties is carriedout. Preferably, step (iv) of identifying each of the different regionsby their properties includes characterizing (i.e. measuring, calculatingor computing) said properties. In other words, at least one property iscalculated for each region, which can then be used as an identifier (orto identify) that region. An example of the properties which may becalculated for a given shape of region is shown in the following table:

TABLE 1 Property of the Region Computational method Area Number ofpixels in the region Perimeter Number of pixels close to edges Averagecolour Average coulour of the pixels of the region Centre Middlecoordinate (x, y) of the pixels in the region Average size Averagedistance of the pixels from the centre of the region Average radiusStandard deviation of the distance from the pixel to the centre

The third part of the method is step (c) of extracting data andparameters of the contiguous regions. In this step, each type of regionpossesses specific parameters, so that calculation of its properties iscarried out depending on the type or format (e.g. shape) of the region.

For example, concentric regions may be made up of multiple rings of thesame colour, as shown in FIG. 7. In this case, each ring has a width wand average distance to the centre r. The data for the properties of theregion are presented in Table 2 below and may be used for approximatingthe properties of the regions in ring format. In other words, the secondcolumn of Table 2 shows the exact mathematical definition of theproperties below for a ring-shaped region. Then, the third column showshow the properties are linked to the properties in Table 1, so the“computational methods” of the second column of Table 1 can be used tocalculate the properties of specifically ring-shaped regions.

TABLE 2 Property of the Exact calculation in Approximation using theRing terms of r and w properties of the region Average distance rAverage size to the centre Width w Average radius Area 2_(TTrW) Area ofthe region Perimeter 4_(TTr) Perimeter of the region

For identifying optical markers, criteria are proposed for adjacentregions to be identified and designated. The properties of the regions(such as those defined in Table 1) make it possible to decide whichregions are adjacent to others, as presented in Table 3 below. That is,the properties of table 1 can be used to identify and designate adjacentregions as shown below.

TABLE 3 Subjective Relevant criterion properties Approximation using theproperties of the region Adjacent Centre of the Dist(Centre₁,Centre₂)<14 +2.AveSize₁ + 9.8 AveRadius₁ regions must be regions, averageDist(Centre₁,Centre₂) <14 +2.AveSize₂ + 9.8 AveRadius₂ close togethersizes and average radii Adjacent regions must be separate from Centre ofthe regions, average sizes and$\frac{\max\left( {{AveSize}_{1},{AveSize}_{2}} \right)}{{Dist}\left( {{Centre}_{1},{Centre}_{2}} \right)} < 1$one another average radii (without overlap) Geometric properties ofadjacent regions must be similar Area of the regions and perimeters$\frac{\max\left( {{Area}_{1},{Area}_{2}} \right)}{\min\left( {{Area}_{1},{Area}_{2}} \right)} < 1.7$ $\frac{\max\left( {{Perimeter}_{1}{Perimeter}_{2}} \right)}{{Min}\left( {{Perimeter}_{1},{Perimeter}_{2}} \right)} < 1.7$

Post-processing of the contiguity data (i.e. the data and parameters ofthe contiguous regions which are extracted) allows the creation ofcontiguity groups. Contiguity groups can be marked preferably with acircle of a random common colour for reasons of visualization anddebugging, as shown in FIG. 8. One possible method of suchpost-processing is described below in step (d).

It should be emphasized that chequerboards are particular cases ofadjacent regions that possess specific properties of regularity. Newalgorithms may take this concept as a basis for identifying otherpatterns of contiguity regions and to create new customized opticalmarkers.

An example of the post-processing referred to above is the fourth partof the method is step (d) of detecting optical markers, such as targetsand chequerboards, by means of a convex hull algorithm (also known as aconvex wrapping algorithm) and prediction of position of squares.

In the particular case of identification of chequerboards, theidentification may be carried out by counting the number of regions ofcontiguous colours in a group as well as by checking the regularity ofthe internal spaces.

In one implementation, step (d) of detecting targets and chequerboardsby means of a convex hull algorithm and prediction of position ofsquares comprises post-processing applied to the group of adjacentregions, which locates the vertices of the chequerboard and inserts arectangle at the cloud point, comprising the following substeps:

(i) calculating the convex hull of the centres of regions of contiguouscolours grouped in the same region;

(ii) for each vertex v_(n) in the convex hull, calculating the anglebetween the lines formed by v_(n)→v_(n-1) and v_(n)→v_(n-1);

(iii) ordering the vertices of the convex hull by the calculated angles;and

(iv) keeping the first four vertices with the largest anglestherebetween and discarding regions whose opposite angles are higherthan a threshold (i.e. very different from one another). In other words,the vertices which have the largest angles between them are assumed tobe at the corners of the chequerboard.

Planar chequerboards are preferably used for identifying parts ofequipment of sufficiently low curvature. When there is low curvature, amarker glued on its surface would not be subjected to substantialdeformations. When a chequerboard has four corner squares which are ofdifferent colours to the background colour, the corners of thechequerboard can be detected, and thus its dimensions can be determined.Preferably, all the vertices (i.e the corner squares) of thechequerboards are made up of black squares. A filter (e.g. a highcontrast filter) may be used to improve the reliability of detection thecorner squares of a chequerboard. This may be particularly useful whenthe corner squares are not black, or when the colours of the cornersquares are not markedly different to the background colour.

The method according to the present disclosure may be applied in thedevelopment of systems comprising multiple calibrated cameras. This mayallow extraction of normal vector data from the markers ofchequerboards, ensuring that the orientation and the positioning of thatcomponent are correct.

Once the dimensions of the chequerboard are known (which may be doneaccording to the method described above), it is possible to estimatewhere the centres of its internal regions are located. An analysis ofthe regularity of the chequerboards is carried out in groups of regionsof contiguous colours, according to the following substeps:

(i) applying a convex hull algorithm using the 2D centres of thecontiguous regions to find four outer squares at the edges of achequerboard;

(ii) calculating and storing the location of fixed squares using thefour outer squares as reference;

(iii) if the group of regions being analysed possesses sufficientregions, assign regions to its position on the closest chequerboardhaving four outer squares;

(iv) rejecting the chequerboard if more than one region is assigned tothe same position.

Step (iii) is used to assign each of the regions to a respectiveestimated position (i.e. fixed square) on the chequerboard. Step (iii)may be omitted if sufficient regions are not present in the group. Thismay be the case, for example, if chequerboard regions on the marker areobscured.

Step (iv) provides a check that the four squares which were identifiedas outer squares of a chequerboard were correctly identified. If morethan one region is assigned to the same position on the chequerboard instep (iii), this may indicate that the regions which would be mapped tothe same position on the chequerboard are not in fact part of achequerboard. This may in turn allow it to be determined that the foursquares which were identified as outer squares are not in fact the fourouter squares of a single chequerboard. In this case, the chequerboardis rejected.

The outer squares as referred to above may be identified by determiningthat they have a colour different to that of the background. They mayall have the same colour, and may, for example, be four black squares asdescribed above.

The analysis of regularity described above allows automaticidentification of the dimensions of the chequerboard by successivechecking of different sizes, as shown in FIGS. 9 and 10. It will be seenfrom these Figures that multiple targets of different types can beidentified in the same image.

The analysis of regularity may also compensate partial occlusions insquares of the chequerboard. In other words, chequerboard may still beidentified when some squares are not visible. Groups of adjacent regionsmay be subject to partial occlusions or their internal regions may notbe identified properly owing to the conditions of luminosity. In thesecases, comparing the centres of the regions effectively identified withthe expected positions of the squares allows recognition of thechequerboard even when various squares are not identified, provided thefour black squares of the vertices (i.e. corners) are visible.

The analysis of regularity will accept (i.e. be able to detect)chequerboards even if not all the positions envisaged on the board areoccupied by a colour region. FIG. 11 shows examples of occlusionpatterns (represented as overlaid squares) in which identification ofthe board will still take place successfully. This is because thesquares at the corners of the chequerboard can be detected, and theoverall shape and dimensions can be determined, despite some of theindividual square regions of the chequerboard being obscured.

In the case of identification of target-shaped markers that compriseconcentric circles (rather than chequerboards), specific properties ofregions of contiguous colours are employed for this type of marker, aspresented in Table 4 below. It will be understood that the belowproperties allow ring-shaped regions to be identified, which in turn mayallow the central circular region of a target-shaped marker.

TABLE 4 Subjective Relevant criterion properties Mathematicalimplementation Adjacent regions must appear In a circular ring there isa $\frac{{{Perimeter} \cdot {AveRadi}}\;{us}}{Area} < 3$ as a constant.circular ring (Perimeter × Width)/ Area = 2 In a circular ring typicallyr > w Properties of circular rings: r, w$\frac{AveSize}{AveRadius}{< {0.5}}$ Adjacent centres of rings thatDistance between centres of$\frac{{Dist}\left( {{Centre}_{1},{Centre}_{2}} \right)}{\left( {\min\left( {{{Av}\;{eRadius}_{1}},\ {{Ave}\;{Radius}_{2}}} \right)} \right.} < 1.3$make up regions concentric and their regions respective must be widthsclose together Widths of adjacent rings must be Width w of the regions$\frac{{{AveRadius}_{1} - {AveRadius}_{2}}}{{Min}\left( {{AveRadius}_{1},\ {{AveRa}\;{dius}_{2}}} \right)} < 1.5$substantially equal

After identification of the regions of contiguous colours, it ispossible to extract and store data of the region, such as which pixelsbelong to each region (list of [x,y] coordinates) and, from there,calculate the parameters presented in Table 1. By combining theseparameters it is possible to identify targets (concentric regions—ringsof the same colour whose centres are close together, as shown in FIG.12) and adjacent regions (adjacent colour regions without overlap whoseproperties are substantially equal). Targets are identified by asequence of characters relating to the sequence of colours thereof,according to the following index: W: white; P: black; R: red; G: green;B: blue; ?: colour unknown (not identified as W, P, R, G or B).

For example, a sequence RWP?G signifies that the colour of the innermostregion is red, followed by white, black, unidentified colour and green.FIGS. 12 and 13 show results of the proposed algorithm.

Thus, the method of the present disclosure allows identification ofmarkers, such as chequerboards and targets comprising concentriccircles, unequivocally and with sufficient robustness, even in thesituation of partial occlusions and/or variations of illumination.

Numerous variations falling within the scope of protection of thepresent application are permitted. This reinforces the fact that thepresent invention is not limited to the particularconfigurations/embodiments described above.

Modifications of the above-described apparatuses and methods,combinations between different variations as practicable, and variationsof aspects of the invention that are obvious to those of skill in theart are intended to be within the spirit and scope of the claims.

The invention claimed is:
 1. Method for optical recognition of opticalmarkers comprising the steps of: acquiring an image; identifying regionsof contiguous colours in the image by flood filling; extracting data andparameters of the contiguous regions; and detecting an optical marker bya convex hull algorithm and prediction of position of squares based onthe data and parameters extracted from the contiguous regions; whereinthe step of detecting the optical marker further comprises an analysisof regularity of chequerboards, comprising at least one of the followingsubsteps: (i) applying a convex hull algorithm using the 2D centres ofthe contiguous regions to find four outer squares at the edges of achequerboard; (ii) calculating and storing the location of fixed squaresusing the four outer squares as reference; (iii) if the group of regionsbeing analysed possesses sufficient regions, assigning regions topositions on the closest chequerboard having four outer squares; (iv)rejecting the chequerboard if more than one region is assigned to thesame position.
 2. Method according to claim 1, wherein the opticalmarker is a chequerboard.
 3. Method according to claim 1, wherein thestep of identifying regions of contiguous colours in the image comprisesthe following substeps: applying at least one filter to the image;detecting edges in the image so as to separate the different regions ofcontiguous colours; carrying out the filling of the separated regionsusing flood filling; and identifying each of the different regions ofcontiguous colours by their properties.
 4. Method according to claim 3,wherein the substep of carrying out filling of the separated regionscomprises at least one of the following substeps: receiving an edge map;creating a map of colour regions; initializing the map of colour regionsby assigning an index to each pixel, the index being a numberrepresenting a colour; and performing the following steps, until the mapof colour regions remains unchanged: (i) scanning the map of colourregions from left to right, from right to left, from top to bottom andfrom bottom to top in parallel, in any order; (ii) if the pixel is notlocated within any edge and its index is greater than that of thepreceding pixel, giving the present pixel the same index as thepreceding pixel.
 5. Method according to claim 1, to wherein the step ofdetecting the optical marker comprises at least one of the followingsubsteps: (i) calculating the convex hull of the centres of regions ofcontiguous colours grouped in the same region; (ii) for each vertex Vnin the convex hull, calculating the angle between the lines formed byVn→Vn-1 and Vn→Vn-1; (iii) ordering the vertices by the calculatedangles; and (iv) keeping the four vertices with the largest anglestherebetween and discarding regions whose opposite angles are higherthan a threshold.
 6. Method according to claim 1, wherein the four outersquares are of the same colour, preferably wherein the four outersquares are black.
 7. Method for optical recognition of optical markerscomprising the steps of: acquiring an image; identifying regions ofcontiguous colours in the image by flood filling; extracting data andparameters of the contiguous regions; and detecting an optical markerbased on the data and parameters extracted from the contiguous regionsby combining the parameters in order to identify an optical marker, theoptical marker being a target comprising a plurality of concentriccircles; wherein the step of detecting the optical marker furthercomprises an analysis of regularity of chequerboards, comprising atleast one of the following substeps: (i) applying a convex hullalgorithm using the 2D centres of the contiguous regions to find fourouter squares at the edges of a chequerboard; (ii) calculating andstoring the location of fixed squares using the four outer squares asreference; (iii) if the group of regions being analysed possessessufficient regions, assigning regions to positions on the closestchequerboard having four outer squares; (iv) rejecting the chequerboardif more than one region is assigned to the same position.
 8. Methodaccording to claim 7, further comprising a assigning a letter to each ofthe contiguous regions to identify the sequence of colours of theplurality of concentric circles.